// source --> https://www.camasc.org.mx/wp-content/plugins/PW-Pro-Slider-And-Carousel-For-VC/js/custom-js.js?ver=5.6.7 jQuery(document).ready(function($) { jQuery(".pl-sub-heading-slider").click(function(e){ var loading='
'; e.preventDefault(); jQuery(this).siblings('.pl-sub-heading').removeClass("pl-heading-active"); jQuery(this).addClass("pl-heading-active"); var rand_id=jQuery(this).attr("data-rand-id"); var cat_id=jQuery(this).attr("data-id"); if(cat_id === undefined || cat_id === null){ cat_id='all'; } var pdata = { action: "pw_load_slider_subcategory", postdata: jQuery(".pw_carousel_form_"+rand_id).serialize()+"&cat_id="+cat_id, nonce: slider_parameters.wp_create_nonce, } jQuery(".pl-main-slider-cnt-"+rand_id).append(loading); jQuery.ajax ({ type: "POST", url : slider_parameters.ajaxurl, data: pdata, success : function(resp){ jQuery(".pl-main-slider-cnt-"+rand_id).css("visibility","hidden"); //confirm(resp); jQuery(".pl-loading-cnt").remove(); jQuery(".pl-main-slider-cnt-"+rand_id).html(resp); //init_like_view(); $(".pl-meta-item-slider").find(".fa-heart-o").each(function(){ var post_id=''; var this_elem=$(this); post_id=$(this).attr("data-id"); if (typeof $.cookie(post_id+"_like") === 'undefined'){ //this_elem.removeClass("fa-heart").addClass("fa-heart-o"); } else { this_elem.removeClass("fa-heart-o").addClass("fa-heart"); } }); setTimeout(function(){ jQuery(".pl-main-slider-cnt-"+rand_id).css("visibility","visible"); },200); //APPLY ZOOMICON AFTER AJAX Mediabox.scanPage(); } }); }); jQuery(".pl-sub-heading-carousels").click(function(e){ var loading='
'; e.preventDefault(); jQuery(this).siblings('.pl-sub-heading').removeClass("pl-heading-active"); jQuery(this).addClass("pl-heading-active"); var rand_id=jQuery(this).attr("data-rand-id"); var cat_id=jQuery(this).attr("data-id"); if(cat_id === undefined || cat_id === null){ cat_id='all'; } var pdata = { action: "pw_load_carousel_subcategory", postdata: jQuery(".pw_carousel_form_"+rand_id).serialize()+"&cat_id="+cat_id, nonce: slider_parameters.wp_create_nonce, } jQuery(".pl-main-slider-cnt-"+rand_id).append(loading); jQuery.ajax ({ type: "POST", url : slider_parameters.ajaxurl, data: pdata, success : function(resp){ jQuery(".pl-main-slider-cnt-"+rand_id).css("visibility","hidden"); //confirm(resp); jQuery(".pl-loading-cnt").remove(); jQuery(".pl-main-slider-cnt-"+rand_id).html(resp); //init_like_view(); $(".pl-meta-item-slider").find(".fa-heart-o").each(function(){ var post_id=''; var this_elem=$(this); post_id=$(this).attr("data-id"); if (typeof $.cookie(post_id+"_like") === 'undefined'){ //this_elem.removeClass("fa-heart").addClass("fa-heart-o"); } else { this_elem.removeClass("fa-heart-o").addClass("fa-heart"); } }); setTimeout(function(){ jQuery(".pl-main-slider-cnt-"+rand_id).css("visibility","visible"); },200); //APPLY ZOOMICON AFTER AJAX Mediabox.scanPage(); } }); }); function init_like_view_slider(){ $(".pl-meta-item-slider").find(".fa-heart-o").each(function(){ var post_id=''; var this_elem=$(this); post_id=$(this).attr("data-id"); if (typeof $.cookie(post_id+"_like") === 'undefined'){ } else { this_elem.removeClass("fa-heart-o").addClass("fa-heart"); } }); $(".pl-meta-item-slider").on("click",".fa-heart",function(){ //confirm("UNLIKE"); var post_id=''; var this_elem=$(this); post_id=$(this).attr("data-id"); this_elem.removeClass("fa-heart").addClass("fa-heart-o"); if (typeof $.cookie(post_id+"_like") === 'undefined'){ } else { $.removeCookie(post_id+"_like",null, { path: '/' }); //confirm("REMOVE"); } var pdata = { action: "pw_save_like_view_slider", postdata: "post_id="+post_id+"&field=ulike", nonce: slider_parameters.wp_create_nonce, } jQuery.ajax ({ type: "POST", url : slider_parameters.ajaxurl, data: pdata, success : function(resp){ this_elem.siblings(".meta-text").html(resp); } }); }); $(".pl-meta-item-slider").on("click",".fa-heart-o",function(){ //confirm("LIKE"); var post_id=''; var this_elem=$(this); post_id=$(this).attr("data-id"); this_elem.removeClass("fa-heart-o").addClass("fa-heart"); if (typeof $.cookie(post_id+"_like") === 'undefined'){ $.cookie(post_id+"_like", 'yourvalue'); } else { //$(this).click(function() { return false; }); //return false; } var pdata = { action: "pw_save_like_view_slider", postdata: "post_id="+post_id+"&field=like", nonce: slider_parameters.wp_create_nonce, } jQuery.ajax ({ type: "POST", url : slider_parameters.ajaxurl, data: pdata, success : function(resp){ this_elem.siblings(".meta-text").html(resp); } }); }); } init_like_view_slider(); }); // source --> https://www.camasc.org.mx/wp-content/themes/camasc/jquery-migrate-1.1.1.js?ver=5.6.7 /*! * jQuery Migrate - v1.1.1 - 2013-02-16 * https://github.com/jquery/jquery-migrate * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT */ (function( jQuery, window, undefined ) { // See http://bugs.jquery.com/ticket/13335 // "use strict"; var warnedAbout = {}; // List of warnings already given; public read only jQuery.migrateWarnings = []; // Set to true to prevent console output; migrateWarnings still maintained jQuery.migrateMute = true; // Show a message on the console so devs know we're active if ( !jQuery.migrateMute && window.console && console.log ) { console.log("JQMIGRATE: Logging is active"); } // Set to false to disable traces that appear with warnings if ( jQuery.migrateTrace === undefined ) { jQuery.migrateTrace = true; } // Forget any warnings we've already given; public jQuery.migrateReset = function() { warnedAbout = {}; jQuery.migrateWarnings.length = 0; }; function migrateWarn( msg) { if ( !warnedAbout[ msg ] ) { warnedAbout[ msg ] = true; jQuery.migrateWarnings.push( msg ); if ( window.console && console.warn && !jQuery.migrateMute ) { console.warn( "JQMIGRATE: " + msg ); if ( jQuery.migrateTrace && console.trace ) { console.trace(); } } } } function migrateWarnProp( obj, prop, value, msg ) { if ( Object.defineProperty ) { // On ES5 browsers (non-oldIE), warn if the code tries to get prop; // allow property to be overwritten in case some other plugin wants it try { Object.defineProperty( obj, prop, { configurable: true, enumerable: true, get: function() { migrateWarn( msg ); return value; }, set: function( newValue ) { migrateWarn( msg ); value = newValue; } }); return; } catch( err ) { // IE8 is a dope about Object.defineProperty, can't warn there } } // Non-ES5 (or broken) browser; just set the property jQuery._definePropertyBroken = true; obj[ prop ] = value; } if ( document.compatMode === "BackCompat" ) { // jQuery has never supported or tested Quirks Mode migrateWarn( "jQuery is not compatible with Quirks Mode" ); } var attrFn = jQuery( "", { size: 1 } ).attr("size") && jQuery.attrFn, oldAttr = jQuery.attr, valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || function() { return null; }, valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set || function() { return undefined; }, rnoType = /^(?:input|button)$/i, rnoAttrNodeType = /^[238]$/, rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, ruseDefault = /^(?:checked|selected)$/i; // jQuery.attrFn migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" ); jQuery.attr = function( elem, name, value, pass ) { var lowerName = name.toLowerCase(), nType = elem && elem.nodeType; if ( pass ) { // Since pass is used internally, we only warn for new jQuery // versions where there isn't a pass arg in the formal params if ( oldAttr.length < 4 ) { migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); } if ( elem && !rnoAttrNodeType.test( nType ) && (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) { return jQuery( elem )[ name ]( value ); } } // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking // for disconnected elements we don't warn on $( "